<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>结伴 - 摞窝窝</title>
    <meta name="viewport"
          content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui,viewport-fit=cover">
    <meta name="copyright" content="Copyright (c) 2006-2019 Mafengwo.">
    <meta name="format-detection" content="telephone=no,address=no">
    <meta name="referrer" content="always">
    <meta name="apple-mobile-web-app-capable" content="no">
    <meta name="apple-mobile-web-app-status-bar-style" content="no">
    <meta property="og:title" content="结伴 - 摞窝窝">
    <meta property="og:url" content="https://m.mafengwo.cn/together/">
    <meta property="og:image" content="https://images.mafengwo.net/mobile/images/logo_2015.png">
    <meta property="og:description" content="">
    <link rel="apple-touch-icon" href="https://images.mafengwo.net/mobile/images/mfw-logo-new.png">
    <!--<script type="text/javascript" async="" charset="utf-8"
            src="https://c.cnzz.com/core.php?web_id=30081550&amp;t=q"></script>-->
    <script type="text/javascript" async="" charset="utf-8"
            src="https://w.cnzz.com/c.php?id=30081550&amp;async=1"></script>
    <script src="js/jquery/jquery.min.js"></script>
    <script src="js/common.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script type="text/javascript">
        /*window.Env = {
            "CNZZID": 30081550,
            "IS_MOBILE": true,
            "WWW_HOST": "www.mafengwo.cn",
            "IMG_HOST": "images.mafengwo.net",
            "W_HTTP": "https:\/\/w.mafengwo.cn",
            "P_HOST": "passport.mafengwo.cn",
            "P_HTTP": "https:\/\/passport.mafengwo.cn",
            "PAGELET_HTTP": "https:\/\/pagelet.mafengwo.cn",
            "JS_HOST": "js.mafengwo.net",
            "TONGJI_HOST": "tongji.mafengwo.cn",
            "UID": 0,
            "CSTK": "89dc098193025ccec3ba68b56c68a2a5_61233a7c7ca4f60f2c388f7d14f2f683",
            "GOOGLE_MAP_KEY": "AIzaSyD-Su0x_rPy1xehlMBcMyTqWkU49Bk53nQ"
        };*/
    </script>

    <link href="https://css.mafengwo.net/css/cv/mobile+css+head:mobile+css+ui^YVw^1526627473.css" rel="stylesheet"
          type="text/css">


    <!-- <script language="javascript"
             src="https://js.mafengwo.net/js/cv/mobile+js+jquery-2.1.4:mobile+js+jquery.mobile-events:js+M+Module:js+M+M:js+M+Log:js+m.statistics:mobile+js+mobile.console.debug:js+advert+inspector:js+client+mfwappsdk^YlNb^1547475788.js"
             type="text/javascript" crossorigin="anonymous"></script>-->

    <!--<script async=""
            src="https://js.mafengwo.net/js/cv/mobile+js+BindMobilePop:mobile+js+ALogin:js+ACnzzGaLog:js+ARecruit:js+ALazyLoad:mobile+js+wakeApp:mobile+js+omc.global^YlRb^1547548780.js"
            crossorigin="anonymous"></script>
    <style type="text/css"></style>-->
    <link rel="stylesheet" href="css/mycss/mycss.css">

</head>
<body>
<div id="pos38"></div>
<header class="head2home">
    <a href="/" class="myLogo"></a>
    <div class="rBtn">
        <a href="/" class="home">官网首页</a>
        <a href="#" class="sch"></a>
    </div>
</header>


<link href="/css/mycss/together.css" rel="stylesheet" type="text/css">


<input id="_j_mdd_id" type="hidden" data-mddid="0">
<input id="_j_all_mdd_num" type="hidden" data-num="2941">
<input id="_j_more" type="hidden" data-more="1" data-flag="3">
<section class="container" data-from="">
    <div class="filter _j_fixed">
        <div class="flr-item _j_mdd_filter">
            <span>目的地</span>
        </div>
        <div class="flr-item _j_time_filter">
            <span>全部出发时间</span>
        </div>
        <div class="flr-drop flr-drop-place _j_mdd _j_mdd_list _j_render_tpl">


            <ul class="all">
                <li class="_j_mdd_select" data-mddid="0" data-name="全部目的地">全部目的地<span class="num">2941</span></li>
            </ul>
            <ul class="col1">
                <li class="on" data-index="0" data-name="境内精选">境内精选</li>
                <li class="_j_country_select" data-index="1" data-name="东南亚">东南亚</li>
                <li class="_j_country_select" data-index="2" data-name="日韩">日韩</li>
                <li class="_j_country_select" data-index="3" data-name="港澳台">港澳台</li>
                <li class="_j_country_select" data-index="4" data-name="亚洲精选">亚洲精选</li>
                <li class="_j_country_select" data-index="5" data-name="美洲">美洲</li>
                <li class="_j_country_select" data-index="6" data-name="欧洲">欧洲</li>
                <li class="_j_country_select" data-index="7" data-name="大洋洲">大洋洲</li>
                <li class="_j_country_select" data-index="8" data-name="非洲">非洲</li>
            </ul>
            <ul class="col2">
                <li class="on" data-mddid="10065" data-name="北京">北京</li>
                <li class="_j_city_select" data-mddid="10099" data-name="上海">上海</li>
                <li class="_j_city_select" data-mddid="10208" data-name="重庆">重庆</li>
                <li class="_j_city_select" data-mddid="12700" data-name="西藏">西藏</li>
                <li class="_j_city_select" data-mddid="12703" data-name="四川">四川</li>
                <li class="_j_city_select" data-mddid="12711" data-name="云南">云南</li>
                <li class="_j_city_select" data-mddid="12719" data-name="安徽">安徽</li>
                <li class="_j_city_select" data-mddid="12720" data-name="内蒙古">内蒙古</li>
                <li class="_j_city_select" data-mddid="12788" data-name="青海">青海</li>
                <li class="_j_city_select" data-mddid="12810" data-name="广西">广西</li>
                <li class="_j_city_select" data-mddid="12871" data-name="福建">福建</li>
                <li class="_j_city_select" data-mddid="12931" data-name="宁夏">宁夏</li>
                <li class="_j_city_select" data-mddid="12938" data-name="海南">海南</li>
                <li class="_j_city_select" data-mddid="12967" data-name="河南">河南</li>
                <li class="_j_city_select" data-mddid="12976" data-name="山东">山东</li>
                <li class="_j_city_select" data-mddid="13033" data-name="山西">山西</li>
                <li class="_j_city_select" data-mddid="13061" data-name="新疆">新疆</li>
                <li class="_j_city_select" data-mddid="13083" data-name="陕西">陕西</li>
                <li class="_j_city_select" data-mddid="13295" data-name="甘肃">甘肃</li>
                <li class="_j_city_select" data-mddid="13732" data-name="湖南">湖南</li>
                <li class="_j_city_select" data-mddid="14103" data-name="贵州">贵州</li>
                <li class="_j_city_select" data-mddid="14387" data-name="江苏">江苏</li>
                <li class="_j_city_select" data-mddid="14575" data-name="浙江">浙江</li>
                <li class="_j_city_select" data-mddid="14674" data-name="广东">广东</li>
                <li class="_j_city_select" data-mddid="14731" data-name="湖北">湖北</li>
                <li class="_j_city_select" data-mddid="14871" data-name="吉林">吉林</li>
                <li class="_j_city_select" data-mddid="15148" data-name="辽宁">辽宁</li>
                <li class="_j_city_select" data-mddid="15508" data-name="江西">江西</li>
                <li class="_j_city_select" data-mddid="16712" data-name="黑龙江">黑龙江</li>
            </ul>
            <ul class="col3">
                <li class="_j_mdd_select" data-mddid="10065" data-name="北京">北京<span class="num">18</span></li>
            </ul>
        </div>
        <div class="flr-drop flr-drop-date _j_time">
            <ul>
                <li class="_j_time_select" data-timeflag="1" data-timeinfo="全部出发时间">全部出发时间<span
                        class="num _j_num">2941</span></li>
                <li class="_j_time_select" data-timeflag="2" data-timeinfo="今天">今天<span class="num _j_num">23</span>
                </li>
                <li class="_j_time_select" data-timeflag="3" data-timeinfo="1个月内">1个月内<span
                        class="num _j_num">1821</span></li>
                <li class="_j_time_select" data-timeflag="4" data-timeinfo="1-3个月内">1-3个月内<span
                        class="num _j_num">735</span></li>
                <li class="_j_time_select" data-timeflag="5" data-timeinfo="3个月以上">3个月以上<span
                        class="num _j_num">410</span></li>
            </ul>
        </div>
    </div>
    <div class="top-num">
        <img width="100%" src="http://plb9q9krt.bkt.clouddn.com/FpKqwST21Fyx1hX7Gh1mnKKNZHHK">
        <div class="vam">
            <ul>
                <li>
                    <span><em>390654</em><br>个旅行计划</span>
                    <span><em>617375</em><br>人参与</span>
                    <span><em>11456</em><br>个目的地</span>
                </li>
            </ul>
        </div>
    </div>
    <div class="lists">
        <ul class="clearfix _j_together_list" render-loop="list">
            <li class="item">
                <a data-url="/together/detail.html?id=" render-key="list.id" render-fun="getUrl">
                    <!--封面信息-->
                    <div class="cover">
                        <img render-src="list.coverUrl">
                        <div class="title">
                            <h3 render-html="list.region.name"></h3>
                            <span render-key="list.days" render-fun="getDays"></span>
                        </div>
                        <span class="departure-date" render-key="list.travelTime"
                              render-fun="getTravelTime">04月08日 出发</span>
                    </div>
                    <!--作者信息-->
                    <div class="info">
                        <!--头像-->
                        <span class="avatar"><img
                                render-src="list.author.headImgUrl"></span>
                        <span class="gender female" render-key="list.author.gender" render-fun="getGender"></span>
                        <!--结伴游作者昵称-->
                        <span class="name" render-html="list.author.nickName"></span>
                        <!--写死level 只为逼格-->
                        <span class="level">lv 15</span>
                        <!--作者所在地-->
                        <span class="location" render-html="list.author.place"></span>
                        <!--结伴游内容-->
                        <div class="txt">
                            <p render-html="list.content.content">
                            </p>
                        </div>
                    </div>
                </a>
            </li>
        </ul>
        <!--<div class="loading _j_more_bnt" style="padding: 15px;text-align: center;font-size: 13px;color: #f39c11;">
            加载更多
        </div>-->
    </div>
    <div class="fixed-btm _j_sort_html">
        <div class="btn-group">
            <a class="btn-sort _j_sort">排序</a>
            <a class="btn-add _j_not_login" href="mine/launchTogether.html">发起结伴</a>
        </div>
    </div>
</section>
<div class="overlay _j_overlay"></div>

<ul class="sort-panel _j_sort_info">
    <a class="_j_together" data-flag="1">最新发表</a>
    <li class="on _j_together" data-flag="2">即将出发</li>
</ul>


<script language="javascript" src="/js/myjs/t_index.js" type="text/javascript"
        crossorigin="anonymous"></script>


<!--<script language="javascript" type="text/javascript">
    if (typeof M !== "undefined" && typeof M.loadResource === "function") {
        M.loadResource("https://js.mafengwo.net/js/cv/mobile+js+BindMobilePop:mobile+js+ALogin:js+ACnzzGaLog:js+ARecruit:js+ALazyLoad:mobile+js+wakeApp:mobile+js+omc.global^YlRb^1547548780.js");
    }
</script>-->
<script>
    $(function () {
        var currentPage = 1;
        //总页数  用来判断是否是最后一页
        var pages;
        //[] 数组,一个容器 将每次拉倒底部查询的每页数据 数组都存放在里面
        var togetherData = [];
        //变量表示 当前页是否已经在查询中 如果是 则不再查询,避免ajax的异步请求发送重复
        var loading = false;//查询状态
        //排序高查的条件
        var flag = getParams().flag;

        //排序的点击事件获取高查的条件
        $("._j_together").click(function () {
            var f = $(this).data("flag");
            location.href = "together.html?flag=" + f;
        })

        //获取我的游记数据
        function query() {
            //如果当前为正在查询 则说明ajax已经发送 不需要重复发送
            if (loading) {
                return;
            }
            //每次在发送ajax前,将查询状态改为正在查询,
            loading = true;
            //发送请求查询所有的结伴信息
            $.get('/togethers', {currentPage: currentPage, pageSize: 4, flag: flag}, function (data) {
                //将查询出来的需要的数据的数组放到容器中
                $.merge(togetherData, data.list);
                //渲染数据
                $(".lists").renderValues({list: togetherData}, {
                    'getDays': function (item, value) {
                        $(item).html(value + ' 天');
                    },
                    'getTravelTime': function (item, value) {
                        $(item).html(value + ' 出发');
                    },
                    'getContent': function (item, value) {
                        $(item).html(value);
                    },
                    //判断是女性还是男性
                    'getGender': function (item, value) {
                        //如果是男性 删除女性图片样式,添加男性图标样式
                        if (value == 1) {
                            $(item).removeClass("female")
                            $(item).addClass("male")
                        } else {
                            $(item).removeClass("male")
                            $(item).addClass("female")
                        }
                    },
                    'getUrl': function (item, value) {
                        var url = $(item).data('url');
                        $(item).attr('href', url + value);
                    },

                });
                //当前页加1 下次将查询第二页数据
                currentPage++;
                //总页数
                pages = data.pages;
                //查询请求结果,则将查询状态改为 不在查询中
                loading = false;
            });
        }

        //默认的第一次查第一页数据
        query();
        //给window绑定滚动事件,当window滚动式,调用其中的函数
        $(window).scroll(function () {
            //判断是否滚动到底部(屏幕高度+HTML滚动超出顶部的高度>=HTML文档的高度)
            if ($(window).height() + $(document).scrollTop() + 1 >= $(document).height()) {
                //滚动到当前文档底部,并且是否还有页数可以显示 有则继续查询出来显示
                if (currentPage <= pages) {
                    query();
                    //滚动到底部时,如果此时还有页数 弹出加载中信息
                    $(document).dialog({
                        type: 'notice',
                        infoText: '加载中',
                        autoClose: 1500,
                        position: 'center'  // center: 居中; bottom: 底部
                    });
                } else {
                    //滚动到当前文档底部,如果已经是最后一页 则弹出已经到底
                    $(document).dialog({
                        type: 'notice',
                        infoText: '亲,已经到底了',
                        autoClose: 1500,
                        position: 'bottom'  // center: 居中; bottom: 底部
                    });
                }
            }

        });

        //发起结伴点击事件
        $(function () {

        });
    });

</script>

</body>
</html>
</body>
</html>